
#ifndef _PCA9538_H
#define _PCA9538_H

	/********************************************************************************************
	 * Included Files
	 ********************************************************************************************/
	#include "sim_i2c.h"
	#include <stdio.h>

	#ifndef true
		#define true  1
	#endif
	#ifndef false
		#define false 0
	#endif


	/* PCA9538 Resources ************************************************************************/
	#define PCA9538_GPIO_NPINS 		8 /* All pins can be used as GPIOs */
	#define PCA9538_ADDR         0x70

	/* PCA9538 Registers ************************************************************************/
	/* Register Addresses */

	#define PCA9538_REG_INPUT  0x00
	#define PCA9538_REG_OUTPUT 0x01
	#define PCA9538_REG_POLINV 0x02
	#define PCA9538_REG_CONFIG 0x03

	extern uint8_t pca9538_init(void);
	extern uint8_t pca9538_read_inputdata(uint8_t *data);

#endif

